home *** CD-ROM | disk | FTP | other *** search
-
- CHG 3.3
-
- A Program to Change
- File Attributes, Dates, and Times
- - and -
- Hide/Unhide directories
- April 5, 1994
-
-
- Syntax
- ------
-
- CHG Filespec [options]
-
- Options
- -------------------------------------------
- / - chg to system date
- mm/dd/yy - chg to mm/dd/yy
- : - chg to system time
- hh:mm - chg to hh:mm
- DH - hide directory(s)
- DX - unhide directory(s)
- D - read attributes of directory(s)
- RHSA - set file(s) to RHSA
- R - set file(s) to R
- X - reset readonly file attributes (no system files)
- Z - reset all file attributes
-
- Execution of CHG without parameters generates a useful help
- screen, returning a DOS error level of 1. Normal CHG
- terminations always return 0 for the error level. Error
- conditions, whether flagged on the screen or not, are indicated
- by an error level of 1.
-
- CHG, unlike ATTRIB and other replacements for DOS ATTRIB, keeps
- to an absolute minimum number of keystrokes to run the program.
- Thus the option string is a cluster of letters (see below)
- indicating attributes to apply, rather than '-' and '+' signs
- associated with each attribute letter. CHG's focus on keystroke
- optimisation also overcomes a problem in other programs of this
- type - to wit, their inability to handle filenames with dashes or
- underscores.
-
- New Features
- ------------
- Version 3.3 of CHG offers several new features, the most
- important of which is that the X option now merely reverses the
- impact of the Readonly attribute, if any. It does not affect
- other attributes, such as the System, Hidden, or Archive
- attributes and does not affect the readonly status of any file
- that has the System attribute. The new Z function does what the
- old X function used to do: Sets all files covered by Filespec to
- absolute reset status.
-
- CHG now comes with two other executables:
-
- CHGB.EXE - Just like CHG.EXE, except that it has no video
- output.
-
- CHGC.EXE - Does just one thing: resets files covered by a
- wildcard in local directory from readonly status
- without touching any system files (equivalent to no
- video, no pathing, no options but the X option).
-
- In this program, absence of any command line
- parameter is equivalent to
-
- CHGC *.*
-
- The user may still use any non-pathed file or
- wildcard on the command line; but if CHGC finds any
- blank on the command line, it will abort with error
- level 1.
-
-
- Comments on Filename/wildcard
- -----------------------------
- Except for CHGC.EXE, the filename or wildcard argument may either
- have no drive or path specifiers or may be fully pathed, as in a
- filespec. With no path or drive information, CHG assumes the
- default drive and path.
-
- However, if the user wishes to change all files in the default
- path, he/she must either use the regular '*.*' wildcard format or
- the '.' shortcut, which is also supported by regular DOS
- commands.
-
- Except for CHGC (which admits no pathing), CHG also supports
- other normal DOS shortcuts, such as "..\." and "..\XYZ\." in
- place of the usual format for wildcards. One may also change the
- attributes, dates or times of all files in a directory simply by
- mentioning the directory name, without the wildcard notation.
- Thus,
-
- CHG WORK R
-
- sets all files in WORK to read only, just as would
-
- CHG WORK\. R or CHG WORK\*.* R
-
- CHG also supports directories, but permits changing only the
- Hidden attribute of a directory or directory wildcard. Attempts
- to change other directory information cause CHG to return to DOS
- with the message
-
- Not supported
-
- Where DH or DX is used as the option string, DOS wildcard
- shortcuts are not supported. To hide all sub-directories of the
- current directory, just use the syntax,
-
- CHG * DH
-
- To reset, use
-
- CHG * DX
-
- To read the current status of all subdirectories, use
-
- CHG * D
-
-
- Comments on the option-string
- -----------------------------
- There are three mutually exclusive types of option-strings:
-
- 1) Attribute-setting option strings.
- ---------------------------------
- These must contain the letters R, H, S, A, X (or Z), or D in
- any combination or order.
-
- These flags have the following meanings:
-
- D: Directory
- R: Read Only
- H: Hidden
- S: System
- A: Archive
- X: Reset (only from Read Only for files, only from
- Hidden for directories)
- Z: Reset (only from file attributes to absolute reset)
-
- Where the FIRST CHARACTER of the option string is D, it
- identifies the file as a directory. CHG supports directory
- wildcards as well as file wildcards.
-
- For both files and directories, CHG uses X for the reset
- function. However, the displayed attribute of a reset file
- or directory is always null.
-
- Where the user specifies the input filespec as a directory
- by using the D prefix on the option string, the directory
- attribute is omitted if the directory is reset (i.e.
- visible).
-
- Supported display attributes: R, H, S, A
-
- Directory examples
- ------------------
- CHG . D Reads the attributes of all sub-
- directories in the default directory.
-
- CHG work\* DH Sets all subdirectories of \work to
- Hidden.
-
- CHG . DX Resets all subdirectories of the default
- directory.
-
- CHG ABC D Reads attribute of subdirectory ABC.
- (No attribute will show if reset)
-
- CHG A* Dh Sets all subdirectories beginning
- with A to Hidden.
-
- File examples
- -------------
- CHG XYZ R Sets file XYZ to Read Only.
-
- CHG *.SYS RHSA Sets all .SYS files to Read Only
- Hidden System Archive.
-
- CHG \SYS\*.DOC X Resets all readonly attributes of
- files in the \SYS subdirectory.
-
- CHG D:SYS H Hides all files in D:\defaultpath\SYS
-
- CHG C: Reads all files in C:\defaultpath
-
- CHG . X Resets all readonly attributes of
- files in the current directory, without
- affecting any System files that may be
- found there.
-
- CHG . Z Removes all attributes of files in
- the current directory.
-
-
- What happens in default mode
- ----------------------------
- Where the second parameter is omitted, or where the second
- parameter is simply a D, CHG simply displays attributes. In
- this mode, no change is made to files or directories.
-
- 2) Date-setting option-strings
- ---------------------------
- If you wish to change the date of a file or series of files
- determined by a wildcard mask, just use your desired date in
- American slash format as your option-string.
-
- Examples
- --------
- CHG RENAME.COM 2/1/89 Changes RENAME.COM to 02-01-1989.
-
- CHG ABC / Changes ABC to current computer
- date. (i.e. to system date)
-
- Caveat -
- If you attempt to change the date/time stamp of a Read Only
- file, no date/time stamp change will occur.
-
- 3) Time-setting option strings
- ---------------------------
- Here, CHG uses the colon (':') to recognise your option
- string as a time. CHG updates the time-stamp of a file to
- one-minute precision.
-
- Examples
- --------
- CHG ABC.EXE 5:40 Changes ABC.EXE to 05:40 A.M.
-
- CHG ABC.EXE 14:20 Changes ABC.EXE to 02:20 P.M.
-
- CHG *.EXE : Changes all .EXE files to current
- computer time (i.e. to system time).
-
- Caveat -
- If you attempt to change the date/time stamp of a Read Only
- file, no date/time stamp change will occur.
-
-
- -------------------------
- End of documentation